<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">
    <title></title>
  </head>
  <body>
    <noscript>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
  <script src="https://eepaas-public.s3.cn-north-1.jdcloud-oss.com/JSSDK/JDME-JSSDK-1.0.1.js"></script>
<script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>
  <script>
      // init vConsole
      var vConsole = new VConsole();
      console.log('Hello world');
  </script>
  <script type="text/javascript">
	let useragent = navigator.userAgent;   
	let ua = navigator.userAgent.toLowerCase();
	const isWeixin = ua.indexOf('micromessenger') != -1;
	const url = window.location.hash
	if(url !== '#/ceshi'){
		if (useragent.indexOf('15E148JDME') > -1|| useragent.search('15E148JDME') > -1 || useragent.indexOf('userAgent:JDME') > -1|| useragent.search('userAgent:JDME') > -1) {
		    //app打开
		}else if(isWeixin){
			alert('已禁止本次访问：您必须登录京东ME访问本页面！！')
			//这个可以关闭安卓系统的手机		
			document.addEventListener('WeixinJSBridgeReady', function(){ WeixinJSBridge.call('closeWindow'); }, false);		
			//这个可以关闭ios系统的手机		
			WeixinJSBridge.call('closeWindow');
		}else{
			// 这里警告框会阻塞当前页面继续加载
			// alert('已禁止本次访问：您必须登录京东ME访问本页面！');
			// var opened = window.open('about:blank', '_self');
			// opened.opener = null;
			// opened.close();
		}
	}	
  </script>
</html>
